diff -Nur lxdm-0.3.0.orig//src/lxdm.c lxdm-0.3.0/src/lxdm.c
--- lxdm-0.3.0.orig//src/lxdm.c	2010-09-24 10:43:49.000000000 -0500
+++ lxdm-0.3.0/src/lxdm.c	2010-10-10 23:13:33.592124056 -0500
@@ -1359,6 +1359,10 @@
 							  "is-local",&is_local,
 							  NULL))
 		setenv("XDG_SESSION_COOKIE", ck_connector_get_cookie(s->ckc), 1);
+		/* I really don't like doing this, but since both kdm and gdm
+		   set this in the environment, and our xinitrc scripts depend
+		   on it, here we go with a minor patch... */
+		setenv("DESKTOP_SESSION", session_name, 1);
 	}
 #endif
 	char** env, *path;
